﻿// ******************************************************
// SMS.Framework
// SMS.Framework.Statistic
// ContinuousVariables.cs
// Copyright (c) 2009, SMS Framework. All Rights Reserved.
// ******************************************************

using System.Linq;
using System.Collections.Generic;

namespace SMS.Framework.Statistic
{

    /// <summary>
    /// Class to calculate the continuous statistic variables.
    /// </summary>
    public class ContinuousVariables
    {

        #region CONSTRUCTORS

            /// <summary>
            /// Constructor of the class.
            /// </summary>
            public ContinuousVariables()
            {
            }

        #endregion

            /// <summary> 
            /// Calculates the average of a sample of values 
            /// </summary> 
            /// <param name="data">Set of values.</param> 
            /// <returns>The average set of values.</returns> 
            /// <remarks></remarks> 
            public decimal Average(decimal[] data)
            {
                return data.Average();
            }
            // Average :: Decimal 

            /// <summary> 
            /// Calculates the average of a sample of values 
            /// </summary> 
            /// <param name="data">Set of values.</param> 
            /// <returns>The average set of values.</returns> 
            /// <remarks></remarks> 
            public double Average(double[] data)
            {
                return data.Average();
            }
            // Average :: Double 

            /// <summary> 
            /// Calculates the average of a sample of values 
            /// </summary> 
            /// <param name="data">Set of values.</param> 
            /// <returns>The average set of values.</returns> 
            /// <remarks></remarks> 
            public int Average(int[] data)
            {
                return (int)data.Average();
            }
            // Average :: Integer 

            /// <summary> 
            /// Calculates the average of a sample of values 
            /// </summary> 
            /// <param name="data">Set of values.</param> 
            /// <returns>The average set of values.</returns> 
            /// <remarks></remarks> 
            public long Average(long[] data)
            {
                return (long)data.Average();
            }
            // Average :: Long 

            /// <summary> 
            /// Calculates the average of a sample of values 
            /// </summary> 
            /// <param name="data">Set of values.</param> 
            /// <returns>The average set of values.</returns> 
            /// <remarks></remarks> 
            public float Average(float[] data)
            {
                return data.Average();
            }
            // Average :: Single 

            /// <summary> 
            /// Calculates the average of a sample of values in a List(Of &lt;T&gt;) values. 
            /// </summary> 
            /// <param name="data">Set of values.</param> 
            /// <returns>The average set of values.</returns> 
            /// <remarks></remarks> 
            public decimal Average(List<decimal> data)
            {
                return data.Average();
            }
            // Average :: Decimal 

            /// <summary> 
            /// Calculates the average of a sample of values in a List(Of &lt;T&gt;) values. 
            /// </summary> 
            /// <param name="data">Set of values.</param> 
            /// <returns>The average set of values.</returns> 
            /// <remarks></remarks> 
            public double Average(List<double> data)
            {
                return data.Average();
            }
            // Average :: Double 

            /// <summary> 
            /// Calculates the average of a sample of values in a List(Of &lt;T&gt;) values. 
            /// </summary> 
            /// <param name="data">Set of values.</param> 
            /// <returns>The average set of values.</returns> 
            /// <remarks></remarks> 
            public int Average(List<int> data)
            {
                return (int)data.Average();
            }
            // Average :: Integer 

            /// <summary> 
            /// Calculates the average of a sample of values in a List(Of &lt;T&gt;) values. 
            /// </summary> 
            /// <param name="data">Set of values.</param> 
            /// <returns>The average set of values.</returns> 
            /// <remarks></remarks> 
            public long Average(List<long> data)
            {
                return (long)data.Average();
            }
            // Average :: Long 

            /// <summary> 
            /// Calculates the average of a sample of values in a List(Of &lt;T&gt;) values. 
            /// </summary> 
            /// <param name="data">Set of values.</param> 
            /// <returns>The average set of values.</returns> 
            /// <remarks></remarks> 
            public float Average(List<float> data)
            {
                return data.Average();
            }
        // Average :: Single 


    } // ContinuousVariables

} // SMS.Framework.Statistic